package me.jiatao.dagger2.module;

import dagger.Module;
import dagger.Provides;
import me.jiatao.dagger2.model.Address;
import me.jiatao.dagger2.model.Student;

/**
 * Created by JiaTao on 2018/8/28.
 * Email: 535318720@qq.com
 * Version: 1.0
 * Description:
 */

@Module
public class MainActivityArgsModule {
    private Address address;

    //构造方法需要传递参数
    public MainActivityArgsModule(Address address) {
        this.address = address;
    }

    @Provides
    public Student provideStudent() {
        Student student = new Student();
        student.address = address;
        return student;
    }
}
